<?php


class Crc_Bootstrap_Resource_Cache extends Zend_Application_Resource_ResourceAbstract
{

    public function init()
    {
        $logger = $this->getBootstrap()->getResource('log');
        $logger->info('Bootstrap ' . __CLASS__);

        $options = $this->getOptions();

        $cache = Zend_Cache::factory(
            $options['frontend'],
            $options['backend'],
            $options['frontendOptions'],
            $options['backendOptions']
        );

        Zend_Registry::set('Zend_Cache_Core', $cache);
    }

}